package com.stylefeng.guns.modular.pay.model;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;

import java.beans.Transient;
import java.io.Serializable;

/**
 * <p>
 * 佳付通流水表
 * </p>
 *
 * @author stylefeng
 * @since 2018-08-17
 */
@TableName("pay_trans_history")
public class TransHistory extends Model<TransHistory> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 商户号
     */
    @TableField("mch_no")
    private String mchNo;
    /**
     * 商户名
     */
    @TableField("mch_name")
    private String mchName;
    @TableField("mer_code")
    private String merCode;
    /**
     * 通道商户编号
     */
    @TableField("ch_mer_code")
    private String chMerCode;
    /**
     * 交易订单号
     */
    @TableField("order_code")
    private String orderCode;
    /**
     * 平台订单号
     */
    @TableField("plat_order_code")
    private String platOrderCode;
    /**
     * 订单时间:YYYYMMDD24HHMMSS
     */
    @TableField("order_time")
    private String orderTime;
    /**
     * 订单金额
     */
    @TableField("order_amount")
    private BigDecimal orderAmount;
    /**
     * 结算方式0:D+0
     */
    @TableField("settle_type")
    private Integer settleType;
    /**
     * 业务编码
     */
    @TableField("bus_code")
    private String busCode;
    /**
     * 真实姓名
     */
    @TableField("real_name")
    private String realName;
    /**
     * 身份证号
     */
    @TableField("id_card")
    private String idCard;
    /**
     * 支付卡号
     */
    @TableField("acc_no")
    private String accNo;
    /**
     * 手机号
     */
    private String mobile;
    /**
     * 前台通知地址
     */
    @TableField("front_url")
    private String frontUrl;
    /**
     * 后台回调地址
     */
    @TableField("call_back_url")
    private String callBackUrl;
    /**
     * 交易时间
     */
    @TableField("tran_time")
    private String tranTime;
    /**
     * 通道流水号
     */
    @TableField("ch_serial_no")
    private String chSerialNo;
    /**
     * 体现手续费
     */
    @TableField("draw_fee")
    private BigDecimal drawFee;
    /**
     * 费率
     */
    @TableField("trade_rate")
    private BigDecimal tradeRate;
    /**
     * 手续费
     */
    @TableField("trade_fee")
    private BigDecimal tradeFee;
    /**
     * 实收金额
     */
    @TableField("actual_amount")
    private BigDecimal actualAmount;
    /**
     * 交易状态(0-成功、1处理中 2失败 3待支付)
     */
    @TableField("tran_status")
    private Integer tranStatus;
    /**
     * 提现状态（0：成功1：处理中 2：失败）
     */
    @TableField("draw_status")
    private Integer drawStatus;
    /**
     * 提现金额（元）
     */
    @TableField("draw_amount")
    private BigDecimal drawAmount;
    /**
     * 应答码
     */
    @TableField("res_code")
    private String resCode;
    @TableField("res_msg")
    private String resMsg;
    @TableField("create_time")
    private Date createTime;
    @TableField("update_time")
    private Date updateTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getMchNo() {
        return mchNo;
    }

    public void setMchNo(String mchNo) {
        this.mchNo = mchNo;
    }

    public String getMchName() {
        return mchName;
    }

    public void setMchName(String mchName) {
        this.mchName = mchName;
    }

    public String getMerCode() {
        return merCode;
    }

    public void setMerCode(String merCode) {
        this.merCode = merCode;
    }

    public String getChMerCode() {
        return chMerCode;
    }

    public void setChMerCode(String chMerCode) {
        this.chMerCode = chMerCode;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getPlatOrderCode() {
        return platOrderCode;
    }

    public void setPlatOrderCode(String platOrderCode) {
        this.platOrderCode = platOrderCode;
    }

    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }

    public BigDecimal getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(BigDecimal orderAmount) {
        this.orderAmount = orderAmount;
    }

    public Integer getSettleType() {
        return settleType;
    }

    public void setSettleType(Integer settleType) {
        this.settleType = settleType;
    }

    public String getBusCode() {
        return busCode;
    }

    public void setBusCode(String busCode) {
        this.busCode = busCode;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getAccNo() {
        return accNo;
    }

    public void setAccNo(String accNo) {
        this.accNo = accNo;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getFrontUrl() {
        return frontUrl;
    }

    public void setFrontUrl(String frontUrl) {
        this.frontUrl = frontUrl;
    }

    public String getCallBackUrl() {
        return callBackUrl;
    }

    public void setCallBackUrl(String callBackUrl) {
        this.callBackUrl = callBackUrl;
    }

    public String getTranTime() {
        return tranTime;
    }

    public void setTranTime(String tranTime) {
        this.tranTime = tranTime;
    }

    public String getChSerialNo() {
        return chSerialNo;
    }

    public void setChSerialNo(String chSerialNo) {
        this.chSerialNo = chSerialNo;
    }

    public BigDecimal getDrawFee() {
        return drawFee;
    }

    public void setDrawFee(BigDecimal drawFee) {
        this.drawFee = drawFee;
    }

    public BigDecimal getTradeRate() {
        return tradeRate;
    }

    public void setTradeRate(BigDecimal tradeRate) {
        this.tradeRate = tradeRate;
    }

    public BigDecimal getTradeFee() {
        return tradeFee;
    }

    public void setTradeFee(BigDecimal tradeFee) {
        this.tradeFee = tradeFee;
    }

    public BigDecimal getActualAmount() {
        return actualAmount;
    }

    public void setActualAmount(BigDecimal actualAmount) {
        this.actualAmount = actualAmount;
    }

    public Integer getTranStatus() {
        return tranStatus;
    }

    public void setTranStatus(Integer tranStatus) {
        this.tranStatus = tranStatus;
    }

    public Integer getDrawStatus() {
        return drawStatus;
    }

    public void setDrawStatus(Integer drawStatus) {
        this.drawStatus = drawStatus;
    }

    public BigDecimal getDrawAmount() {
        return drawAmount;
    }

    public void setDrawAmount(BigDecimal drawAmount) {
        this.drawAmount = drawAmount;
    }

    public String getResCode() {
        return resCode;
    }

    public void setResCode(String resCode) {
        this.resCode = resCode;
    }

    public String getResMsg() {
        return resMsg;
    }

    public void setResMsg(String resMsg) {
        this.resMsg = resMsg;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
    
    //业务查询字段
    private String beginTime;
 
    private String endTime;
   
    @Transient
    public String getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(String beginTime) {
		this.beginTime = beginTime;
	}
	@Transient
	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}


    @Override
    public String toString() {
        return "TransHistory{" +
        "id=" + id +
        ", mchNo=" + mchNo +
        ", mchName=" + mchName +
        ", merCode=" + merCode +
        ", chMerCode=" + chMerCode +
        ", orderCode=" + orderCode +
        ", platOrderCode=" + platOrderCode +
        ", orderTime=" + orderTime +
        ", orderAmount=" + orderAmount +
        ", settleType=" + settleType +
        ", busCode=" + busCode +
        ", realName=" + realName +
        ", idCard=" + idCard +
        ", accNo=" + accNo +
        ", mobile=" + mobile +
        ", frontUrl=" + frontUrl +
        ", callBackUrl=" + callBackUrl +
        ", tranTime=" + tranTime +
        ", chSerialNo=" + chSerialNo +
        ", drawFee=" + drawFee +
        ", tradeRate=" + tradeRate +
        ", tradeFee=" + tradeFee +
        ", actualAmount=" + actualAmount +
        ", tranStatus=" + tranStatus +
        ", drawStatus=" + drawStatus +
        ", drawAmount=" + drawAmount +
        ", resCode=" + resCode +
        ", resMsg=" + resMsg +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
